<?php

class Cd {

    protected $_artist;
    protected $_artistId;
    
    protected $_cdName;
    protected $_cdNameId;
    
    protected $_cdCover;
    protected $_cdCoverId;

    protected $_cdDescription;

    protected $_musics;

    public function __construct() {
        $this->_artist      = '';
        $this->_artistId    = 0;
        $this->_cdName      = '';
        $this->_cdNameId    = 0;
        $this->_cdCover     = '';
        $this->_cdCoverId   = '';
        $this->_musics      = Array();
        $this->_cdDescription   = '';
    }

    public function setCdArtist($artist) {
        $this->_artist  = $artist;
    }

    public function getCdArtist() {
        return $this->_artist;
    }

    public function setCdArtistId($artistId) {
        $this->_artistId  = $artistId;
    }

    public function getCdArtistId() {
        return $this->_artistId;
    }

    public function setCdName($cdName) {
        $this->_cdName  = $cdName;
    }

    public function getCdName() {
        return $this->_cdName;
    }

    public function setCdNameId($cdNameId) {
        $this->_cdNameId  = $cdNameId;
    }

    public function getCdNameId() {
        return $this->_cdNameId;
    }

    public function setCdCover($cdCover) {
        $this->_cdCover     = $cdCover;
    }

    public function getCdCover() {
        return $this->_cdCover;
    }

    public function setCdCoverId($cdCoverId) {
        $this->_cdCoverId     = $cdCoverId;
    }

    public function getCdCoverId() {
        return $this->_cdCoverId;
    }


    public function setCdDescription ($cdDescription) {
        $this->_cdDescription   = $cdDescription;
    }

    public function getCdDescription() {
        return $this->_cdDescription;
    }

    public function addCdMusic($id, $music) {
        $this->_musics[$id]     = $music;
    }

    public function delCdMusic($id) {
        if(isset($this->_musics[$id])) {
            unset($this->_musics[$id]);
        }
    }

    public function getCdMusics() {
        return $this->_musics;
    }

}

?>
